aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/[username]/settings/_security.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-03 23:13:49 -0700
committerAdam Soltys <[email protected]>2022-10-03 23:13:49 -0700
commit63f1a6780bab85ebb48ca1fc142cc6beaf772faa (patch)
treeb498ac8dd1a8ac5ffd517e6a8050399d9d7a86a1 /src/routes/[username]/settings/_security.svelte
parent8906099f391acf19f7b8eb91527b027cedd65b5e (diff)
downloadcoinos-ui-63f1a6780bab85ebb48ca1fc142cc6beaf772faa.tar.gz
coinos-ui-63f1a6780bab85ebb48ca1fc142cc6beaf772faa.zip
refactoring
Diffstat (limited to 'src/routes/[username]/settings/_security.svelte')
-rw-r--r--src/routes/[username]/settings/_security.svelte12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/routes/[username]/settings/_security.svelte b/src/routes/[username]/settings/_security.svelte
index 1b8fb125..3c0009dc 100644
--- a/src/routes/[username]/settings/_security.svelte
+++ b/src/routes/[username]/settings/_security.svelte
@@ -32,7 +32,7 @@
if (setting2fa && token.length === 6) {
await put('/enable2fa', { token });
success('2FA enabled');
- $user.twofa = 1;
+ user.twofa = 1;
toggleEnabling();
}
} catch (e) {
@@ -46,7 +46,7 @@
if (disabling2fa && token.length === 6) {
await put('/disable2fa', { token });
success('2FA disabled');
- $user.twofa = 0;
+ user.twofa = 0;
toggleDisabling();
}
} catch (e) {
@@ -54,7 +54,7 @@
}
};
- $: otpUri = `otpauth://totp/coinos:${$user.username}?secret=${$user.otpsecret}&period=30&digits=6&algorithm=SHA1&issuer=coinos`;
+ $: otpUri = `otpauth://totp/coinos:${user.username}?secret=${user.otpsecret}&period=30&digits=6&algorithm=SHA1&issuer=coinos`;
</script>
<!-- TODO
@@ -66,7 +66,7 @@
{#if settingPin}
<div class="flex my-4">
<div class="mx-auto">
- <Pincode bind:code bind:value={$user.pin} bind:this={pinInput}>
+ <Pincode bind:code bind:value={user.pin} bind:this={pinInput}>
<PincodeInput />
<PincodeInput />
<PincodeInput />
@@ -110,7 +110,7 @@
<div class="text-center my-4">
{$t('user.settings.accountId')}<br />
- <b>{$user.otpsecret}</b>
+ <b>{user.otpsecret}</b>
</div>
<div class="text-center my-4">
@@ -136,7 +136,7 @@
<PincodeInput />
</Pincode>
</div>
- {:else if $user.twofa}
+ {:else if user.twofa}
<button type="button" class="primary" on:click={toggleDisabling}>
<Icon icon="mobile" style="mr-1" />
{$t('user.settings.twofaDisable')}